﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.IO;

namespace DuplexDeviceEvent
{
    [ServiceContract(Namespace = "Silverlight", CallbackContract = typeof(IDeviceEventServiceClient))]
    public interface IDeviceEventService
    {
        [OperationContract(IsOneWay = true)]
        void Connect(string id);
    }

    [ServiceContract]
    public interface IDeviceEventServiceClient
    {
        [OperationContract(IsOneWay = true)]
        void SendDeviceEventData(DeviceEventData data);
    }

    [ServiceContract]
    public interface IPolicyRetriever
    {
        [OperationContract, WebGet(UriTemplate = "/clientaccesspolicy.xml")]
        Stream GetSilverlightPolicy();
        [OperationContract, WebGet(UriTemplate = "/crossdomain.xml")]
        Stream GetFlashPolicy();
    }
}